<template>
    <div>
  <div>
    <div class="jbxx" >基本信息</div>
    <el-container>
      <el-aside
        width="200px"
        style="border:1px solid #ccc; text-align: center; line-height: 58px"
        >医院名称</el-aside
      >
      <el-main style="border:1px solid #ccc">{{ show.hosname }}</el-main>
      <el-aside
        width="100"
        style="border:1px solid #ccc; text-align: center; line-height: 58px"
        >医院LOGO</el-aside
      >
      <el-main style="border:1px solid #ccc"
        ><img :src="'data:image/png;base64,' + show.logoData"
      /></el-main>
    </el-container>

    <el-container>
      <el-aside
        width="200px"
        style="border:1px solid #ccc; text-align: center; line-height: 58px"
        >医院编号</el-aside
      >
      <el-main style="border:1px solid #ccc">{{ show.hoscode }}</el-main>
      <el-aside
        width="200px"
        style="border:1px solid #ccc; text-align: center; line-height: 58px"
        >医院地址</el-aside
      >
      <el-main style="border:1px solid #ccc"
        >{{ show.param? show.param.fullAddress:"" }}</el-main>
    </el-container>
    <el-container>
      <el-aside
        width="200px"
        style="border:1px solid #ccc; text-align: center; line-height: 58px"
        >坐车路线</el-aside
      >
      <el-main style="border:1px solid #ccc">{{ show.route }}</el-main>
    </el-container>
    <el-container>
      <el-aside
        width="200px"
        style="border:1px solid #ccc; text-align: center; line-height: 58px"
        >医院简介</el-aside
      >
      <el-main style="border:1px solid #ccc"></el-main>
    </el-container>
  </div>
  <div>
    <div class="jbxx" >预约规则信息</div>
    <el-container>
      <el-aside
        width="200px"
        style="border:1px solid #ccc; text-align: center; line-height: 58px"
        >预约周期</el-aside
      >
      <el-main style="border:1px solid #ccc">{{ bookingRule.cycle }}天</el-main>
      <el-aside
        width="200px"
        style="border:1px solid #ccc; text-align: center; line-height: 58px"
        >放号时间</el-aside
      >
      <el-main style="border:1px solid #ccc"
        >{{ bookingRule.releaseTime
 }}</el-main>
    </el-container>

    <el-container>
      <el-aside
        width="200px"
        style="border:1px solid #ccc; text-align: center; line-height: 58px"
        >停挂时间</el-aside
      >
      <el-main style="border:1px solid #ccc">{{ bookingRule.stopTime }}</el-main>
      <el-aside
        width="200px"
        style="border:1px solid #ccc; text-align: center; line-height: 58px"
        >退号时间</el-aside
      >
      <el-main style="border:1px solid #ccc"
        >{{ bookingRule.quitTime }}</el-main>
    </el-container>
    <el-container>
      <el-aside
        width="200px"
        style="border:1px solid #ccc; text-align: center; line-height: 58px"
        >预约规则</el-aside
      >
      <el-main style="border:1px solid #ccc"><div v-for="item in bookingRule.rule"> {{ item }}</div></el-main>
    </el-container>
  </div>
  </div>
</template>

<script>
import { reqhospitallshow } from "@/api/hospitallist";
export default {
  name: "Hospitallistshow",
  data() {
    return {
      id: 0,
      show: {},
      bookingRule:{}
    };
  },
  mounted() {
    console.log(this.$route.params.id);
    this.id = this.$route.params.id;
    this.getshow();
  },
  methods: {
    async getshow() {
      try {
        const re = await reqhospitallshow(this.id);
        console.log(re.data.hospital,re.data.bookingRule);
        this.show = re.data.hospital;
        this.bookingRule=re.data.bookingRule
      } catch (e) {}
    },
  },
};
</script>

<style lang="scss" scoped>
.jbxx{
    font-weight:800;
    margin:20px
}
</style>
